# Copyright 2018 Maco
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import uuid
# json消息代码返回，1成功 0失败
CODE_SUCCESS = 1
CODE_FAILED = 0

# http return code
CODE_OK = 200

COOKIE_USER = 'username'
COOKIE_USER_LOCALE = 'locale'
COOKIE_TOKEN = 'token'

# 节点注册标记
NODE_REG = 'node.register'

# 标记挖矿程序是否运行，1是，0否
MINE_STATUS = 'mine.status'

# 挖矿时间间隔，默认单位秒s
MINE_DIFF_TIME = 30

# 为此节点生成一个全球唯一的地址
NODE_UNIQUE = str(uuid.uuid4()).replace('-', '')
